package com.dixon.worddayday.request;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

@Data
public class RegisterReq extends BaseReq{
    @NotBlank(message = "账号不能为空")
    @Pattern(regexp = "^[a-zA-Z][a-zA-Z0-9]+$", message = "账号以英文字母开头的英文与数字组合")
    @Size(min = 4, max = 20, message = "账号有效长度为4-20位")
    private String username;
    @NotBlank(message = "密码不能为空")
    @Size(min = 6, max = 50, message = "密码至少6位")
    private String password;
}
